﻿using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IWarehouseService
    {
        /// <summary>
        /// 添加库房
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddWarehouse(Warehouse m, out string message);

        /// <summary>
        /// 列表显示
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<Warehouse> GetAllWarehouseList(string? name, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 修改库房
        /// </summary>
        /// <param name="wh"></param>
        /// <returns></returns>
        bool UpdWarehouse(Warehouse wh, out string message);

        /// <summary>
        /// 删除库房
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DelWarehouse(long id);

        /// <summary>
        /// 根据主键获取对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Warehouse? GetWarehouseById(long id);
    }
}
